Now we can use our random x-coordinate to place the ball!

  • Click the Codesters tab. Then, go to and drag Go To into your program.
  • Change the name in front of the .go_to() command to ball.
  • Replace the first number in the .go_to() command with x and the second with -25. Like this: (x, -25).

Now when we press Run the ball will go to a random position on the stage.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)